<template>
<span>
  <em>{{h<10?'0'+h:h}}</em>:<em>{{m<10?'0'+m:m}}</em>:<em>{{s<10?'0'+s:s}}</em>
</span>
</template>

<script>
export default{
data(){
  return{
    h:'00',
    m:'00',
    s:'00',
    endtime:0
  }
},
props: ['data_date'],
created(){
  this.endtime = this.data_date;
  this.timeOutFn();
},
methods:{
  timeOutFn(){
    this.h=parseInt(this.endtime / (60 * 60));
    this.m=parseInt(this.endtime / 60 % 60);
    this.s=parseInt(this.endtime % 60);
    if(this.endtime>0){
      setTimeout(this.timeOutFn,1000);
      this.endtime--;
    }
  }
}
}
</script>

<style type="text/scss" lang="scss" scoped></style>
